GBML manual / Audio

sound_stop

Stops the currently-playing instance of this sound, if the engine still remembers one - a no-op if it already finished or was never playing.

Syntax

sound_stop(s)

Arguments

NameType
ssound

Returns

Nothing.

Description

Stops the currently-playing instance of this sound, if the engine still remembers one - a no-op if it already finished on its own or was never playing. Useful for a looping or long effect (an alarm siren, a charge-up whine) that needs to be cut short by something else happening.

Example

sound_stop(snd_doc_beep);

Stops this sound if it happens to be playing right now; harmless to call even if it is not.

See also: sound_play